﻿namespace ShootMan
{
    public class UIManagerConfig : shaco.IUIManagerConfig
    {
        public string prefixPath => _prefixPath;
        private string _prefixPath = $"{GlobalDefines.HOTUPDATE_ROOT}Prefabs/UI/";

        public string GetFullPath(string key)
        {
            var findIndex = key.LastIndexOf('.');
            var lastName = findIndex >= 0 ? key.Substring(findIndex + 1) : key;
            var retValue = $"{_prefixPath}{lastName}.prefab";
            return retValue;
        }

        public string FullPathToKey(string path)
        {
            var classTypeName = path.Remove(_prefixPath);
            return classTypeName;
        }
    }

    public class StackLocationConfig : shaco.Base.IStackLocationConfig
    {
        public string[] defaultIngoreStackTag => new string[] { "shaco/Base", "shaco.", "UIManager" };
    }
}

